"""
    This module contains all fb2 genres dictionary
"""
genres_dict = {
    'sf_history': _("sf_history"),
    'sf_action': _("sf_action"),
    'sf_epic': _("sf_epic"),
    'sf_heroic': _("sf_heroic"),
    'sf_detective': _("sf_detective"),
    'sf_cyberpunk': _("sf_cyberpunk"),
    'sf_space': _("sf_space"),
    'sf_social': _("sf_social"),
    'sf_horror': _("sf_horror"),
    'sf_humor': _("sf_humor"),
    'sf_fantasy': _("sf_fantasy"),
    'sf': _("sf"),
    'det_classic': _("det_classic"),
    'det_police': _("det_police"),
    'det_action': _("det_action"),
    'det_irony': _("det_irony"),
    'det_history': _("det_history"),
    'det_espionage': _("det_espionage"),
    'det_crime': _("det_crime"),
    'det_political': _("det_political"),
    'det_maniac': _("det_maniac"),
    'det_hard': _("det_hard"),
    'thriller': _("thriller"),
    'detective': _("detective"),
    'prose_classic': _("prose_classic"),
    'prose_history': _("prose_history"),
    'prose_contemporary': _("prose_contemporary"),
    'prose_counter': _("prose_counter"),
    'prose_rus_classic': _("prose_rus_classic"),
    'prose_su_classics': _("prose_su_classics"),
    'love_contemporary': _("love_contemporary"),
    'love_history': _("love_history"),
    'love_detective': _("love_detective"),
    'love_short': _("love_short"),
    'love_erotica': _("love_erotica"),
    'adv_western': _("adv_western"),
    'adv_history': _("adv_history"),
    'adv_indian': _("adv_indian"),
    'adv_maritime': _("adv_maritime"),
    'adv_geo': _("adv_geo"),
    'adv_animal': _("adv_animal"),
    'adventure': _("adventure"),
    'child_tale': _("child_tale"),
    'child_verse': _("child_verse"),
    'child_prose': _("child_prose"),
    'child_sf': _("child_sf"),
    'child_det': _("child_det"),
    'child_adv': _("child_adv"),
    'child_education': _("child_education"),
    'children': _("children"),
    'poetry': _("poetry"),
    'dramaturgy': _("dramaturgy"),
    'antique_ant': _("antique_ant"),
    'antique_european': _("antique_european"),
    'antique_russian': _("antique_russian"),
    'antique_east': _("antique_east"),
    'antique_myths': _("antique_myths"),
    'antique': _("antique"),
    'sci_history': _("sci_history"),
    'sci_psychology': _("sci_psychology"),
    'sci_culture': _("sci_culture"),
    'sci_religion': _("sci_religion"),
    'sci_philosophy': _("sci_philosophy"),
    'sci_politics': _("sci_politics"),
    'sci_business': _("sci_business"),
    'sci_juris': _("sci_juris"),
    'sci_linguistic': _("sci_linguistic"),
    'sci_medicine': _("sci_medicine"),
    'sci_phys': _("sci_phys"),
    'sci_math': _("sci_math"),
    'sci_chem': _("sci_chem"),
    'sci_biology': _("sci_biology"),
    'sci_tech': _("sci_tech"),
    'science': _("science"),
    'comp_www': _("comp_www"),
    'comp_programming': _("comp_programming"),
    'comp_hard': _("comp_hard"),
    'comp_soft': _("comp_soft"),
    'comp_db': _("comp_db"),
    'comp_osnet': _("comp_osnet"),
    'computers': _("computers"),
    'ref_encyc': _("ref_encyc"),
    'ref_dict': _("ref_dict"),
    'ref_ref': _("ref_ref"),
    'ref_guide': _("ref_guide"),
    'reference': _("reference"),
    'nonf_biography': _("nonf_biography"),
    'nonf_publicism': _("nonf_publicism"),
    'nonf_criticism': _("nonf_criticism"),
    'nonfiction': _("nonfiction"),
    'design': _("design"),
    'religion_rel': _("religion_rel"),
    'religion_esoterics': _("religion_esoterics"),
    'religion_self': _("religion_self"),
    'religion': _("religion"),
    'humor_anecdote': _("humor_anecdote"),
    'humor_prose': _("humor_prose"),
    'humor_verse': _("humor_verse"),
    'humor': _("humor"),
    'home_cooking': _("home_cooking"),
    'home_pets': _("home_pets"),
    'home_crafts': _("home_crafts"),
    'home_entertain': _("home_entertain"),
    'home_health': _("home_health"),
    'home_garden': _("home_garden"),
    'home_diy': _("home_diy"),
    'home_sport': _("home_sport"),
    'home_sex': _("home_sex"),
    'home': _("home")
    }


def expand_genre(g):
    if genres_dict.has_key(g) and not genres_dict[g] is None:
        return genres_dict[g]
    else:
        return g

